permission request button for led sign page#1990
Open
Embotic-Wayne wants to merge 9 commits intoLED4MEMBERSfrom
Open
permission request button for led sign page#1990Embotic-Wayne wants to merge 9 commits intoLED4MEMBERSfrom
Embotic-Wayne wants to merge 9 commits intoLED4MEMBERSfrom
Conversation
…into Request-Button4LEDSIGN
Contributor
|
you spelled permission wrong |
Collaborator
Author
evanugarte
reviewed
Jan 23, 2026
src/Pages/LedSign/LedSign.js
Outdated
| }, []) | ||
|
|
||
| if (loading) { | ||
| if (loading || checkingPermission) { |
Collaborator
There was a problem hiding this comment.
i think we can skip the second checkingPermission check, so the page loads as soon as the healthcheck is done
renderPermissionRequestUI can have the checkingPermission check instead, and it can have some small message like "loading", and then fade in the result (requested already or not yet)
evanugarte
reviewed
Jan 25, 2026
Comment on lines
16
to
23
| if (res.ok) { | ||
| const data = await res.json(); | ||
| status.responseData = Array.isArray(data) && data.length > 0 ? data[0] : null; | ||
| } else if (res.status === 404) { | ||
| status.responseData = null; | ||
| } else { | ||
| status.error = true; | ||
| } |
Collaborator
There was a problem hiding this comment.
this should work
Suggested change
| if (res.ok) { | |
| const data = await res.json(); | |
| status.responseData = Array.isArray(data) && data.length > 0 ? data[0] : null; | |
| } else if (res.status === 404) { | |
| status.responseData = null; | |
| } else { | |
| status.error = true; | |
| } | |
| status.error = !!res.ok; | |
| if (res.ok) { | |
| const data = await res.json(); | |
| status.responseData = Array.isArray(data) && data.length > 0 ? data[0] : null; | |
| } |
Comment on lines
46
to
56
| if (res.ok) { | ||
| // Backend sends 200 with no body on success, so fetch the created request | ||
| const existingRequest = await getPermissionRequest(type, token); | ||
| status.responseData = existingRequest.responseData; | ||
| } else if (res.status === 409) { | ||
| // If conflict, fetch the existing request | ||
| const existingRequest = await getPermissionRequest(type, token); | ||
| status.responseData = existingRequest.responseData; | ||
| } else { | ||
| status.error = true; | ||
| } |
Collaborator
There was a problem hiding this comment.
would this work
Suggested change
| if (res.ok) { | |
| // Backend sends 200 with no body on success, so fetch the created request | |
| const existingRequest = await getPermissionRequest(type, token); | |
| status.responseData = existingRequest.responseData; | |
| } else if (res.status === 409) { | |
| // If conflict, fetch the existing request | |
| const existingRequest = await getPermissionRequest(type, token); | |
| status.responseData = existingRequest.responseData; | |
| } else { | |
| status.error = true; | |
| } | |
| status.error = !!res.ok; | |
| if (res.ok || res.status === 409) { | |
| // Backend sends 200 with no body on success, so fetch the created request | |
| const existingRequest = await getPermissionRequest(type, token); | |
| status.responseData = existingRequest.responseData; | |
| } |
src/Pages/LedSign/LedSign.js
Outdated
Comment on lines
299
to
301
| <p className="text-sm text-gray-600 dark:text-gray-400 italic"> | ||
| Drop a message in Discord to speed up the process | ||
| </p> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <p className="text-sm text-gray-600 dark:text-gray-400 italic"> | |
| Drop a message in Discord to speed up the process | |
| </p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

step 2